Malware is short for malicious software and is used as a term to refer to any software designed to infiltrate or damage a computer system without the owner's informed consent. Malware can include computer viruses, worms, trojan horses, rootkits, adware, spyware and any other malicious and unwanted software.
When a device is infected by a malware program the user will often notice unwanted behaviour and degradation of system performance as the infection can create unwanted processor activity, memory usage, and network traffic. This can also cause stability issues leading to application or system-wide crashes. The user of an infected device may incorrectly assume that poor performance is a result of software flaws or hardware problems, taking inappropriate remedial action, when the actual cause is a malware infection of which they are unaware. Furthermore, even if a malware infection does not cause a perceptible change in the performance of a device, it may be performing other malicious functions such as monitoring and stealing potentially valuable commercial, personal and/or financial information, or hijacking a device so that it may be exploited for some illegitimate purpose.
Many end users make use of anti-virus software to detect and possibly remove malware. In order to detect a malware file, the anti-virus software must have some way of identifying it amongst all the other files present on a device. Typically, this requires that the anti-virus software has a database containing the “signatures” or “fingerprints” that are characteristic of individual malware program files. When the supplier of the anti-virus software identifies a new malware threat, the threat is analysed and its signature is generated. The malware is then “known” and its signature can be distributed to end users as updates to their local anti-virus software databases.
Using approaches that rely on signature scanning to detect malware still leaves computers vulnerable to “unknown” malware programs that have not yet been analysed for their signature. To address this issue, in addition to scanning for malware signatures, most anti-virus applications additionally employ heuristic analysis. This approach involves the application of general rules intended to distinguish the behaviour of any malware from that of clean/legitimate programs. For example, the behaviour of all programs on a PC is monitored and if a program attempts to write data to an executable program, the anti-virus software can flag this as suspicious behaviour. Heuristics can be based on behaviours such as API calls, attempts to send data over the Internet, etc.
In order to detect and/or analyse malware programs, it is often useful to run a program in an isolated environment or test system, otherwise known as a virtual machine or emulator. A virtual machine or emulator comprises a program that mimics the functionality of various components of a real computer system. For example, a computer using a Linux® operating system can run a virtual machine that imitates the environment provided by a Windows® operating system. This can include emulation of the CPU, the memory, the communications interfaces and any associated hardware. By running a program in an emulated environment, any malicious activity can be confined to the virtual environment without risking the underlying computer system. The behaviour of a program within the emulated environment can then be observed, and any malware signatures or malicious behaviour used to identify the program as malware. In addition, for a program that has been or is suspected of being malware, anti-virus engineers usually run the program in an emulated environment in order to analyse or ‘debug’ its behaviour. This allows anti-virus engineers to reverse engineer the malware program, and thereby determine ways of detecting and then disinfecting computers infected by the program.
Malware authors therefore try to avoid malware detection and analysis tools that use emulation and/or debugging techniques. To do so, they design the malware to detect when they are being executed in an emulated environment and/or when they area being debugged. If such a malware program determines that it is being executed in an emulated environment and/or that it is being debugged, it will then either terminate itself as soon as possible or alter its behaviour so as to not perform any malicious activity or otherwise suspicious behaviour.